package com.wicket.okrcalc.web.contorller;
import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrcalc.biz.service.dto.req.*;
import com.wicket.okrcalc.biz.service.dto.res.*;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcalc.biz.service.CalculationRulesService;
import com.wicket.okrcalc.common.util.CommonFunctionHelper;
import com.wicket.okrcalc.common.ro.OkrResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/calc/calculationRules/")
public class CalculationRulesController {
    @Autowired
    CalculationRulesService  calculationRulesService;
/**
   * D4-计算两个数相减服务(公共)
   */
    @PostMapping("calculateSubtractionOfTwoNumServiceCom")
    public OkrResult<CalculateSubtractionOfTwoNumServiceComRespDto> calculateSubtractionOfTwoNumServiceCom(@RequestBody @Validated CalculateSubtractionOfTwoNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateSubtractionOfTwoNumServiceCom(reqDTO));
    }
/**
   * D4-计算两个数复合计算服务(公共)
   */
    @PostMapping("calculateComplexCalcOfTwoNumServiceCom")
    public OkrResult<CalculateComplexCalcOfTwoNumServiceComRespDto> calculateComplexCalcOfTwoNumServiceCom(@RequestBody @Validated CalculateComplexCalcOfTwoNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateComplexCalcOfTwoNumServiceCom(reqDTO));
    }
/**
   * D4-计算数据集去除最大最小求平均服务(公共)
   */
    @PostMapping("calculatePartAveOfMultipleNumServiceCom")
    public OkrResult<CalculatePartAveOfMultipleNumServiceComRespDto> calculatePartAveOfMultipleNumServiceCom(@RequestBody @Validated CalculatePartAveOfMultipleNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculatePartAveOfMultipleNumServiceCom(reqDTO));
    }
/**
   * D4-计算数据集求平均值服务(公共)
   */
    @PostMapping("calculateAverageOfMultipleNumServiceCom")
    public OkrResult<CalculateAverageOfMultipleNumServiceComRespDto> calculateAverageOfMultipleNumServiceCom(@RequestBody @Validated CalculateAverageOfMultipleNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateAverageOfMultipleNumServiceCom(reqDTO));
    }
/**
   * D4-计算数据集求最小值服务(公共)
   */
    @PostMapping("calculateMinimumOfMultipleNumServiceCom")
    public OkrResult<CalculateMinimumOfMultipleNumServiceComRespDto> calculateMinimumOfMultipleNumServiceCom(@RequestBody @Validated CalculateMinimumOfMultipleNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateMinimumOfMultipleNumServiceCom(reqDTO));
    }
/**
   * 待删除--D4-计算数据集求最大值服务(公共)
   */
    @PostMapping("calculateMaxOfMultipleNumServiceCom")
    public OkrResult<CalculateMaxOfMultipleNumServiceComRespDto> calculateMaxOfMultipleNumServiceCom(@RequestBody @Validated CalculateMaxOfMultipleNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateMaxOfMultipleNumServiceCom(reqDTO));
    }
/**
   * D4-计算数据集取最新服务(公共)
   */
    @PostMapping("calculateNewestOfMultipleNumServiceCom")
    public OkrResult<CalculateNewestOfMultipleNumServiceComRespDto> calculateNewestOfMultipleNumServiceCom(@RequestBody @Validated CalculateNewestOfMultipleNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateNewestOfMultipleNumServiceCom(reqDTO));
    }
/**
   * D4-计算角色主观得分服务(公共)
   */
    @PostMapping("calculateRoleSubjectiveScoreServiceCom")
    public OkrResult<CalculateRoleSubjectiveScoreServiceComRespDto> calculateRoleSubjectiveScoreServiceCom(@RequestBody @Validated CalculateRoleSubjectiveScoreServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateRoleSubjectiveScoreServiceCom(reqDTO));
    }
/**
   * D4-计算数据集复合计算服务(公共)
   */
    @PostMapping("calculateComplexCalcOfMultipleNumServiceCom")
    public OkrResult<CalculateComplexCalcOfMultipleNumServiceComRespDto> calculateComplexCalcOfMultipleNumServiceCom(@RequestBody @Validated CalculateComplexCalcOfMultipleNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateComplexCalcOfMultipleNumServiceCom(reqDTO));
    }
/**
   * D4-计算数据集求和服务(公共)
   */
    @PostMapping("calculateSumOfMultipleNumServiceCom")
    public OkrResult<CalculateSumOfMultipleNumServiceComRespDto> calculateSumOfMultipleNumServiceCom(@RequestBody @Validated CalculateSumOfMultipleNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateSumOfMultipleNumServiceCom(reqDTO));
    }
/**
   * D4-计算两个数值比服务(公共)
   */
    @PostMapping("calculateRatioOfTwoNumServiceCom")
    public OkrResult<CalculateRatioOfTwoNumServiceComRespDto> calculateRatioOfTwoNumServiceCom(@RequestBody @Validated CalculateRatioOfTwoNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateRatioOfTwoNumServiceCom(reqDTO));
    }
/**
   * D4-计算两个数差额比服务(公共)
   */
    @PostMapping("calculateRatioBetweenTwoNumServiceCom")
    public OkrResult<CalculateRatioBetweenTwoNumServiceComRespDto> calculateRatioBetweenTwoNumServiceCom(@RequestBody @Validated CalculateRatioBetweenTwoNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateRatioBetweenTwoNumServiceCom(reqDTO));
    }
/**
   * D4-计算两个数相加服务(公共)
   */
    @PostMapping("calculateAdditionOfTwoNumServiceCom")
    public OkrResult<CalculateAdditionOfTwoNumServiceComRespDto> calculateAdditionOfTwoNumServiceCom(@RequestBody @Validated CalculateAdditionOfTwoNumServiceComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateAdditionOfTwoNumServiceCom(reqDTO));
    }
/**
   * D4-计算两个数相除服务(公共)
   */
    @PostMapping("calculateDivisionOfTwoNumCom")
    public OkrResult<CalculateDivisionOfTwoNumComRespDto> calculateDivisionOfTwoNumCom(@RequestBody @Validated CalculateDivisionOfTwoNumComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateDivisionOfTwoNumCom(reqDTO));
    }
/**
   * D4-计算服务集合(公共)
   */
    @PostMapping("calculateCalcServiceCollectionCom")
    public OkrResult<CalculateCalcServiceCollectionComRespDto> calculateCalcServiceCollectionCom(@RequestBody @Validated CalculateCalcServiceCollectionComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateCalcServiceCollectionCom(reqDTO));
    }
/**
   * D4-计算服务集合（数据集）(公共)
   */
    @PostMapping("implementCalcServiceCollectionOfMultipleNumCom")
    public OkrResult<ImplementCalcServiceCollectionOfMultipleNumComRespDto> implementCalcServiceCollectionOfMultipleNumCom(@RequestBody @Validated ImplementCalcServiceCollectionOfMultipleNumComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.implementCalcServiceCollectionOfMultipleNumCom(reqDTO));
    }
/**
   * D4-计算数据集取最早(公共)
   */
    @PostMapping("calculateOldestOfMultipleNumCom")
    public OkrResult<CalculateOldestOfMultipleNumComRespDto> calculateOldestOfMultipleNumCom(@RequestBody @Validated CalculateOldestOfMultipleNumComReqDto reqDTO){
    return OkrResult.success(calculationRulesService.calculateOldestOfMultipleNumCom(reqDTO));
    }
}
  